from django.db import models
# Create your models here.
from django.db import models
from user.models import User


class Vistor(models.Model):
    username = models.CharField('名字', max_length=50, null=False)
    phone = models.CharField('电话', max_length=11)
    title = models.CharField('主题', max_length=20)
    area = models.CharField('地区', max_length=20)
    dispute = models.CharField('案件类型', max_length=20)
    money_involved = models.DecimalField('涉案金额', max_digits=10, decimal_places=2)
    content = models.TextField('具体内容')
    hope_time = models.DateField('希望完成时间', null=False, default='2021-10-1')
    create_time = models.DateField(auto_now_add=True, )
    update_time = models.DateField(auto_now=True, )
    user = models.ForeignKey(User, on_delete=models.CASCADE, default=1)

    class Meta:
        db_table = 'visitor'
